{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "42faf6de-d99c-46e2-a80b-fe2fe39cceb5",
   "metadata": {},
   "outputs": [],
   "source": [
    "x = 5\n",
    "x =\"a\"*x\n",
    "print(x)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c0e81780-c76c-4f60-8611-70ee8f72160f",
   "metadata": {},
   "source": [
    "下面是一段丰富且图文并茂的 Jupyter Notebook 用 Markdown 示例代码：\n",
    "\n",
    "```markdown\n",
    "# 图文并茂的 Markdown 示例\n",
    "\n",
    "## 1. 标题与子标题\n",
    "你可以使用不同数量的 `#` 来创建各级标题。例如：\n",
    "### 三级标题\n",
    "#### 四级标题\n",
    "\n",
    "## 2. 文本样式\n",
    "- **粗体文本**：使用两个星号 `**` 包裹文本。\n",
    "- *斜体文本*：使用一个星号 `*` 包裹文本。\n",
    "- ~~删除线文本~~：使用两个波浪线 `~~` 包裹文本。\n",
    "\n",
    "## 3. 列表\n",
    "### 无序列表\n",
    "- 项目 1\n",
    "- 项目 2\n",
    "    - 子项目 2.1\n",
    "    - 子项目 2.2\n",
    "- 项目 3\n",
    "\n",
    "### 有序列表\n",
    "1. 第一项\n",
    "2. 第二项\n",
    "    1. 子项 2.1\n",
    "    2. 子项 2.2\n",
    "3. 第三项\n",
    "\n",
    "## 4. 代码块\n",
    "### 行内代码\n",
    "使用反引号 ` 包裹行内代码，例如 `print(\"Hello, World!\")`。\n",
    "\n",
    "### 代码块\n",
    "你可以使用三个反引号 ``` 包裹多行代码，并指定语言类型：\n",
    "```python\n",
    "# 这是一个 Python 代码示例\n",
    "def greet(name):\n",
    "    return f\"Hello, {name}!\"\n",
    "\n",
    "message = greet(\"Markdown\")\n",
    "print(message)\n",
    "```\n",
    "\n",
    "## 5. 引用\n",
    "> 这是一个引用示例。你可以使用大于号 `>` 来创建引用内容。\n",
    "> 引用内容可以跨越多行。\n",
    "\n",
    "## 6. 表格\n",
    "| 姓名 | 年龄 | 职业 |\n",
    "| ---- | ---- | ---- |\n",
    "| 张三 | 25   | 工程师 |\n",
    "| 李四 | 30   | 教师 |\n",
    "| 王五 | 22   | 学生 |\n",
    "\n",
    "## 7. 图片\n",
    "![示例图片](https://picsum.photos/200/300)\n",
    "这里展示了一张随机图片，你可以替换图片链接来显示自己想要的图片。\n",
    "\n",
    "## 8. 分割线\n",
    "你可以使用三个或更多的连字符 `---` 来创建分割线。\n",
    "---\n",
    "\n",
    "通过以上这些 Markdown 语法，你可以在 Jupyter Notebook 中创建出内容丰富、图文并茂的文档。\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "384cfb72-117f-4875-b01a-db7f3fecec1c",
   "metadata": {},
   "source": [
    "Jupyter的前身是IPython，以下是Python Jupyter的发展历史：\n",
    "- **IPython的诞生（2001年）**：Fernando Pérez开始开发IPython，旨在为Python提供一个更高效的交互式计算环境，方便科研人员和开发者进行快速的代码测试、调试和探索性数据分析。最初的IPython主要关注于命令行交互，提供了比标准Python解释器更丰富的功能，如自动补全、历史记录、代码片段执行等。\n",
    "- **IPython的发展（2007 - 2010年）**：2007年，IPython引入了Qt控制台，提供了一个更友好的图形化界面，支持富文本输出、绘图等功能。2010年，IPython开始支持并行计算，使得用户可以方便地在多个核心或分布式环境中运行代码，大大提高了计算效率。\n",
    "- **Jupyter的诞生（2014年）**：随着数据科学和机器学习的兴起，人们对于交互式计算环境的需求越来越多样化。2014年，IPython项目进行了重大转型，更名为Jupyter，意为支持Julia、Python和R三种语言（后来支持了更多语言）。Jupyter Notebook作为Jupyter的核心组件之一，成为了数据科学家、分析师和教育工作者广泛使用的工具。它允许用户以单元格为单位编写和运行代码，并支持Markdown格式的文本输入，方便用户记录代码的思路、解释分析结果和撰写文档。\n",
    "- **Jupyter的持续发展（2014年至今）**：自2014年以来，Jupyter社区不断发展壮大，大量的扩展和插件被开发出来，以满足不同用户的需求。例如，JupyterLab作为Jupyter Notebook的下一代界面，提供了更强大的功能和更灵活的工作空间布局。同时，Jupyter在教育领域也得到了广泛应用，许多高校和在线课程都使用Jupyter Notebook来教授编程和数据科学相关课程。\n",
    "\n",
    "如今，Jupyter已经成为了数据科学和交互式计算领域的重要工具，为全球的科研人员、数据分析师和开发者提供了一个高效、便捷的工作环境。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e512c2d0-6255-46fe-a507-9ded4a54af20",
   "metadata": {},
   "source": [
    "<!DOCTYPE html>\n",
    "<html lang=\"en\">\n",
    "\n",
    "<head>\n",
    "    <meta charset=\"UTF-8\">\n",
    "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n",
    "    <script src=\"https://cdn.tailwindcss.com\"></script>\n",
    "    <link href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css\" rel=\"stylesheet\">\n",
    "    <title>示例网页</title>\n",
    "</head>\n",
    "\n",
    "<body class=\"bg-gray-100 font-sans\">\n",
    "    <!-- 导航栏 -->\n",
    "    <nav class=\"bg-blue-500 p-4\">\n",
    "        <div class=\"container mx-auto flex justify-between items-center\">\n",
    "            <a href=\"#\" class=\"text-white text-xl font-bold\">示例网站</a>\n",
    "            <div class=\"space-x-4\">\n",
    "                <a href=\"#\" class=\"text-white hover:text-gray-200\">主页</a>\n",
    "                <a href=\"#\" class=\"text-white hover:text-gray-200\">关于</a>\n",
    "                <a href=\"#\" class=\"text-white hover:text-gray-200\">联系我们</a>\n",
    "            </div>\n",
    "        </div>\n",
    "    </nav>\n",
    "    <!-- 主内容 -->\n",
    "    <main class=\"container mx-auto p-8\">\n",
    "        <h1 class=\"text-4xl font-bold text-gray-800 mb-4\">欢迎来到示例网站</h1>\n",
    "        <p class=\"text-gray-700 text-lg mb-8\">这是一个使用 Tailwind CSS 和 Font Awesome 构建的示例网页。它展示了如何创建一个具有响应式设计和现代外观的网页。</p>\n",
    "        <a href=\"#\" class=\"bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded flex items-center justify-center w-fit\">\n",
    "            <i class=\"fa-solid fa-arrow-right mr-2\"></i>了解更多\n",
    "        </a>\n",
    "        <div class=\"mt-8 grid grid-cols-1 md:grid-cols-2 gap-4\">\n",
    "            <div class=\"bg-white p-4 rounded shadow\">\n",
    "                <img src=\"https://picsum.photos/200/300\" alt=\"示例图片\" class=\"w-full h-auto mb-4\">\n",
    "                <h2 class=\"text-xl font-bold text-gray-800 mb-2\">图片一</h2>\n",
    "                <p class=\"text-gray-700\">这是一张示例图片，展示了网页中的图片布局。</p>\n",
    "            </div>\n",
    "            <div class=\"bg-white p-4 rounded shadow\">\n",
    "                <img src=\"https://picsum.photos/200/300\" alt=\"示例图片\" class=\"w-full h-auto mb-4\">\n",
    "                <h2 class=\"text-xl font-bold text-gray-800 mb-2\">图片二</h2>\n",
    "                <p class=\"text-gray-700\">这是另一张示例图片，同样展示了网页中的图片布局。</p>\n",
    "            </div>\n",
    "        </div>\n",
    "    </main>\n",
    "    <!-- 页脚 -->\n",
    "    <footer class=\"bg-gray-200 p-4 text-center text-gray-600\">\n",
    "        <p>&copy; 2025 示例网站。保留所有权利。</p>\n",
    "    </footer>\n",
    "</body>\n",
    "\n",
    "</html>\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "370f13c1-5e17-4735-92e2-1745a5fb203e",
   "metadata": {},
   "source": [
    "<!DOCTYPE html>\n",
    "<html lang=\"en\">\n",
    "\n",
    "<head>\n",
    "    <meta charset=\"UTF-8\">\n",
    "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n",
    "    <title>无 CSS 的示例网页</title>\n",
    "</head>\n",
    "\n",
    "<body>\n",
    "    <!-- 网页标题 -->\n",
    "    <h1>欢迎来到示例网页</h1>\n",
    "\n",
    "    <!-- 段落 -->\n",
    "    <p>这是一个不使用任何 CSS 样式的简单 HTML 网页示例。它展示了 HTML 基础标签的使用。</p>\n",
    "\n",
    "    <!-- 无序列表 -->\n",
    "    <h2>无序列表示例</h2>\n",
    "    <ul>\n",
    "        <li>列表项 1</li>\n",
    "        <li>列表项 2</li>\n",
    "        <li>列表项 3</li>\n",
    "    </ul>\n",
    "\n",
    "    <!-- 有序列表 -->\n",
    "    <h2>有序列表示例</h2>\n",
    "    <ol>\n",
    "        <li>第一项</li>\n",
    "        <li>第二项</li>\n",
    "        <li>第三项</li>\n",
    "    </ol>\n",
    "\n",
    "    <!-- 表格 -->\n",
    "    <h2>表格示例</h2>\n",
    "    <table>\n",
    "        <tr>\n",
    "            <th>姓名</th>\n",
    "            <th>年龄</th>\n",
    "            <th>职业</th>\n",
    "        </tr>\n",
    "        <tr>\n",
    "            <td>张三</td>\n",
    "            <td>25</td>\n",
    "            <td>工程师</td>\n",
    "        </tr>\n",
    "        <tr>\n",
    "            <td>李四</td>\n",
    "            <td>30</td>\n",
    "            <td>教师</td>\n",
    "        </tr>\n",
    "    </table>\n",
    "\n",
    "    <!-- 图片 -->\n",
    "    <h2>图片示例</h2>\n",
    "    <img src=\"https://picsum.photos/200/300\" alt=\"示例图片\">\n",
    "\n",
    "    <!-- 链接 -->\n",
    "    <h2>链接示例</h2>\n",
    "    <p>点击下面的链接访问百度：</p>\n",
    "    <a href=\"https://www.baidu.com\">百度</a>\n",
    "</body>\n",
    "\n",
    "</html>\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2f21889c-c5f1-4e8f-8807-d1d853fbd410",
   "metadata": {},
   "source": [
    "<!DOCTYPE html>\n",
    "<html lang=\"en\">\n",
    "\n",
    "<head>\n",
    "    <meta charset=\"UTF-8\">\n",
    "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n",
    "    <title>复杂 HTML 表格示例</title>\n",
    "    <style>\n",
    "        table {\n",
    "            width: 100%;\n",
    "            border-collapse: collapse;\n",
    "            font-family: Arial, sans-serif;\n",
    "        }\n",
    "\n",
    "        th,\n",
    "        td {\n",
    "            border: 1px solid #ddd;\n",
    "            padding: 8px;\n",
    "            text-align: left;\n",
    "        }\n",
    "\n",
    "        th {\n",
    "            background-color: #f2f2f2;\n",
    "        }\n",
    "\n",
    "        tr:nth-child(even) {\n",
    "            background-color: #f9f9f9;\n",
    "        }\n",
    "\n",
    "        tr:hover {\n",
    "            background-color: #eaeaea;\n",
    "        }\n",
    "\n",
    "        @media screen and (max-width: 600px) {\n",
    "            table,\n",
    "            thead,\n",
    "            tbody,\n",
    "            th,\n",
    "            td,\n",
    "            tr {\n",
    "                display: block;\n",
    "            }\n",
    "\n",
    "            th {\n",
    "                position: absolute;\n",
    "                top: -9999px;\n",
    "                left: -9999px;\n",
    "            }\n",
    "\n",
    "            tr {\n",
    "                border: 1px solid #ccc;\n",
    "            }\n",
    "\n",
    "            td {\n",
    "                border: none;\n",
    "                border-bottom: 1px solid #eee;\n",
    "                position: relative;\n",
    "                padding-left: 50%;\n",
    "            }\n",
    "\n",
    "            td:before {\n",
    "                position: absolute;\n",
    "                left: 6px;\n",
    "                width: 45%;\n",
    "                padding-right: 10px;\n",
    "                white-space: nowrap;\n",
    "            }\n",
    "\n",
    "            td:nth-of-type(1):before {\n",
    "                content: \"学生姓名\";\n",
    "            }\n",
    "\n",
    "            td:nth-of-type(2):before {\n",
    "                content: \"科目\";\n",
    "            }\n",
    "\n",
    "            td:nth-of-type(3):before {\n",
    "                content: \"成绩\";\n",
    "            }\n",
    "\n",
    "            td:nth-of-type(4):before {\n",
    "                content: \"考试日期\";\n",
    "            }\n",
    "        }\n",
    "    </style>\n",
    "</head>\n",
    "\n",
    "<body>\n",
    "    <table>\n",
    "        <thead>\n",
    "            <tr>\n",
    "                <th rowspan=\"2\">学生姓名</th>\n",
    "                <th colspan=\"3\">第一学期</th>\n",
    "            </tr>\n",
    "            <tr>\n",
    "                <th>科目</th>\n",
    "                <th>成绩</th>\n",
    "                <th>考试日期</th>\n",
    "            </tr>\n",
    "        </thead>\n",
    "        <tbody>\n",
    "            <tr>\n",
    "                <td>张三</td>\n",
    "                <td>数学</td>\n",
    "                <td>90</td>\n",
    "                <td>2024-09-15</td>\n",
    "            </tr>\n",
    "            <tr>\n",
    "                <td>张三</td>\n",
    "                <td>语文</td>\n",
    "                <td>85</td>\n",
    "                <td>2024-09-16</td>\n",
    "            </tr>\n",
    "            <tr>\n",
    "                <td>李四</td>\n",
    "                <td>数学</td>\n",
    "                <td>78</td>\n",
    "                <td>2024-09-15</td>\n",
    "            </tr>\n",
    "            <tr>\n",
    "                <td>李四</td>\n",
    "                <td>语文</td>\n",
    "                <td>88</td>\n",
    "                <td>2024-09-16</td>\n",
    "            </tr>\n",
    "        </tbody>\n",
    "        <tfoot>\n",
    "            <tr>\n",
    "                <td colspan=\"4\">注：以上成绩为第一学期部分科目成绩。</td>\n",
    "            </tr>\n",
    "        </tfoot>\n",
    "    </table>\n",
    "</body>\n",
    "\n",
    "</html>\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "01cf6203-4a1c-40ec-8cff-1b1acc938e90",
   "metadata": {},
   "source": [
    "### 微积分\n",
    "\n",
    "牛顿 - 莱布尼茨公式：\n",
    "$$\n",
    "\\int_{a}^{b} f(x) \\, dx = F(b) - F(a)\n",
    "$$\n",
    "其中 $ F(x) $ 是 $ f(x) $ 的一个原函数。\n",
    "\n",
    "多元函数的泰勒展开式：\n",
    "$$\n",
    "f(\\mathbf{x}+\\mathbf{h}) = f(\\mathbf{x}) + \\nabla f(\\mathbf{x})^T \\mathbf{h} + \\frac{1}{2} \\mathbf{h}^T H_f(\\mathbf{x}) \\mathbf{h} + \\mathcal{O}(\\|\\mathbf{h}\\|^3)\n",
    "$$\n",
    "这里 $ \\mathbf{x}, \\mathbf{h} \\in \\mathbb{R}^n $，$ \\nabla f(\\mathbf{x}) $ 是 $ f $ 在 $ \\mathbf{x} $ 处的梯度，$ H_f(\\mathbf{x}) $ 是 $ f $ 在 $ \\mathbf{x} $ 处的海森矩阵。\n",
    "\n",
    "### 线性代数\n",
    "\n",
    "特征值和特征向量的定义：\n",
    "$$\n",
    "A \\mathbf{v} = \\lambda \\mathbf{v}\n",
    "$$\n",
    "其中 $ A $ 是一个 $ n \\times n $ 矩阵，$ \\lambda $ 是 $ A $ 的特征值，$ \\mathbf{v} $ 是对应的特征向量。\n",
    "\n",
    "矩阵的奇异值分解（SVD）：\n",
    "$$\n",
    "A = U \\Sigma V^T\n",
    "$$\n",
    "其中 $ U $ 是 $ m \\times m $ 正交矩阵，$ \\Sigma $ 是 $ m \\times n $ 对角矩阵，$ V $ 是 $ n \\times n $ 正交矩阵。\n",
    "\n",
    "### 概率论\n",
    "\n",
    "多元正态分布的概率密度函数：\n",
    "$$\n",
    "f(\\mathbf{x}) = \\frac{1}{(2\\pi)^{n/2} |\\Sigma|^{1/2}} \\exp\\left(-\\frac{1}{2} (\\mathbf{x} - \\boldsymbol{\\mu})^T \\Sigma^{-1} (\\mathbf{x} - \\boldsymbol{\\mu})\\right)\n",
    "$$\n",
    "其中 $ \\mathbf{x} \\in \\mathbb{R}^n $，$ \\boldsymbol{\\mu} $ 是均值向量，$ \\Sigma $ 是协方差矩阵。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "00315d8c-cd3a-4157-a3f1-c0781e2a7f12",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
